package mark.tom.fiter;

import android.os.Handler;
import android.os.Looper;

import androidx.annotation.NonNull;

class Utils {

    private final static Handler mainThread = new Handler(Looper.getMainLooper());

    static void runOnMainThread(@NonNull Runnable r) {
        checkNull(r);
        mainThread.post(r);
    }

    private static void checkNull(Object o) {
        if (null == o) {
            throw new NullPointerException();
        }
    }

}
